Ext.define('DragonApp.view.ban.Grid', {
    extend: 'Ext.grid.Panel',
    alias: ['widget.bangrid'],

    controller: 'ban',

    requires: [
        'DragonApp.view.ban.Bar',
        'DragonApp.store.JsonPBan',
        'DragonApp.view.ban.Window'
    ],
    selModel: {
        selType: 'checkboxmodel',
        checkOnly: true,
        mode: 'MULTI'
    },

    viewConfig: {
        enableTextSelection: true
    },

    dockedItems: [{
        xtype: 'ban-bar',
        dock: 'top'
    }],

    columns: [
        { text: '玩家ID', dataIndex: 'id', align: 'center' },
        { text: '角色名称', dataIndex: 'nickname', align: 'center' },
        { text: '封号状态', dataIndex: 'enable', renderer: 'accountRender', align: 'center' },
        { text: '封号原因', dataIndex: 'account_reason', flex: 1, align: 'center' },
        { text: '截止时间', dataIndex: 'account_deadline', width: 145, align: 'center' },
        { text: '禁言状态', dataIndex: 'donttalk', renderer: 'commentRender', align: 'center' },
        { text: '禁言原因', dataIndex: 'donttalk_reason', flex: 1, align: 'center' },
        { text: '截止时间', dataIndex: 'donttalk_deadline', width: 145, align: 'center' }
    ],
    store: {
        type : 'jsonPBanStore',
        storeId : 'jsonPBanStore'
    }
});